package com.hao.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * TODO
 *
 * @author 97472
 * @version 1.0
 * @date 2022/1/10 16:43
 */
@RestController
@Slf4j
public class PaymentController {

    @Value("${server.port}")
    private Integer port;

    @Value("${spring.application.name}")
    private String name;

    @GetMapping("/payment/consult")
    public String pay(){
        String result = name + ":" + port + UUID.randomUUID();
        log.info(result);
        return result;
    }
}
